package 
{
	
	import flash.geom.*;
	
	import flash.display.Sprite;
	import flash.events.*;
	import flash.text.TextField;
	
	import vue.Cube3D;
	import vue.Objet3D;
	import vue.ObjetDecore3D;
	
	 //[SWF(width="500", heigh="500", frameRate="10")]
	public class Taweb extends Sprite
	{
		/**
		private var centreX:Number = stage.stageWidth/2;
 	    private var centreY:Number = stage.stageHeight/2;
 	    **/
 	    private var centreX:Number = 300;
 	    private var centreY:Number = 300;
 	    private var msg:TextField = new TextField();

 	    
        private var scene:Sprite;
		private var vecteurCubes:Vector.<Sprite>;

		public function Taweb()
		{
			/**
			 * TODO : Ã©tape 1 parser le fichier xml
			**/
			
			// CrÃ©ation d'un second sprite pour initialiser les axes de rotation de l'objet 3D au centre de l'Ã©cran
	        //scene = new Sprite();
	        //scene.x = -50;
	        //scene.y = centreY/2;
	        
	        //addChild(scene);

			// test1
			/*
			var od:Objet3D = new ObjetDecore3D();
		    od = new Cube3D(od,1,1,1,100,100,100);
		    od = new Cube3D(od,1,1,1,100,0,0);
		    od = new Cube3D(od,1,1,1,300,100,100);
		    od = new Cube3D(od,1,1,1,250,50,100);
		    od = new Cube3D(od,1,1,1,100,200,50);
		   	addChild(od);
		   	*/
		   	
		   	//test table
		   	var table:Objet3D = new ObjetDecore3D();
		   	// ajout du pied 1
		    table = new Cube3D(table,1,15,1,100,200,100);
		    
		    // ajout du pied 2
		    table = new Cube3D(table,1,15,1,200,200,100);
		    
		    // ajout du pied 3
		    table = new Cube3D(table,1,15,1,200,200,0);
		    
		    // ajout du pied 4
		    table = new Cube3D(table,1,15,1,100,200,0);
		    
		    // ajout du tablier
		    table = new Cube3D(table,13,1,15,130,120,220);
		    
		   	addChild(table);
		}
	}
}

